package pers.lt.hibernatebeans;

import javax.persistence.*;

/**
 * Created by gjj on 2018/1/16.
 */
@Entity(name = "ROLE_INFO")
public class RoleInfoEntity {
    private String id;
    private String rolename;
    private String roleremarker;
    private String roleurl;

    @Id
    @Column(name = "ID", nullable = false, length = 255)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "ROLENAME", nullable = true, length = 255)
    public String getRolename() {
        return rolename;
    }

    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    @Basic
    @Column(name = "ROLEREMARKER", nullable = true, length = 255)
    public String getRoleremarker() {
        return roleremarker;
    }

    public void setRoleremarker(String roleremarker) {
        this.roleremarker = roleremarker;
    }

    @Basic
    @Column(name = "ROLEURL", nullable = true, length = 255)
    public String getRoleurl() {
        return roleurl;
    }

    public void setRoleurl(String roleurl) {
        this.roleurl = roleurl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RoleInfoEntity that = (RoleInfoEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (rolename != null ? !rolename.equals(that.rolename) : that.rolename != null) return false;
        if (roleremarker != null ? !roleremarker.equals(that.roleremarker) : that.roleremarker != null) return false;
        if (roleurl != null ? !roleurl.equals(that.roleurl) : that.roleurl != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (rolename != null ? rolename.hashCode() : 0);
        result = 31 * result + (roleremarker != null ? roleremarker.hashCode() : 0);
        result = 31 * result + (roleurl != null ? roleurl.hashCode() : 0);
        return result;
    }
}
